import logo from './logo.svg';
import './App.css';
import * as THREE from 'three';

console.log(THREE)

let w=window.innerWidth;
let h=window.innerHeight;

// 场景
let sence =new THREE.Scene()
// 物体
let geometry=new THREE.BoxGeometry(1,1,1)
let material=new THREE.MeshBasicMaterial()
let cube=new THREE.Mesh(geometry,material)
sence.add(cube)

// 相机

let camera=new THREE.PerspectiveCamera(75,w/h,0.1,100)

camera.position.set(0,0,5)
camera.lookAt(0,0,0)

// 渲染器

let render=new THREE.WebGLRenderer()

render.setSize(w,h)
render.render(sence,camera)

document.body.append(render.domElement)

function App() {
  return (
    <div className="App">
      
    </div>
  );
}

export default App;
